package com.chenliang.testfilter.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: springboot-filter
 * @description:
 * @author: chenLiang
 * @create: 2022-08-04 16:59
 */
@Configuration
public class Filter05Config {

    @Bean
    public Filter05 filter05() {
        return new Filter05();
    }

    @Bean
    public FilterRegistrationBean<Filter05> requestCachingFilterRegistration(Filter05 filter05) {
        FilterRegistrationBean<Filter05> bean = new FilterRegistrationBean<>(filter05);
        bean.setOrder(Integer.MIN_VALUE);
        return bean;
    }
}
